Optimal. Leaf size=151 \[ \frac {(A+B) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{f g (p+1)}-\frac {B 2^{\frac {1}{2}-\frac {p}{2}} (1-\sin (e+f x))^{\frac {p+1}{2}} (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+1}{2};\frac {p+3}{2};\frac {1}{2} (\sin (e+f x)+1)\right )}{f g (p+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.26, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2859, 2689, 70, 69} \[ \frac {(A+B) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{f g (p+1)}-\frac {B 2^{\frac {1}{2}-\frac {p}{2}} (1-\sin (e+f x))^{\frac {p+1}{2}} (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1} \, _2F_1\left (\frac {p+1}{2},\frac {p+1}{2};\frac {p+3}{2};\frac {1}{2} (\sin (e+f x)+1)\right )}{f g (p+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 69
Rule 70
Rule 2689
Rule 2859
Rubi steps
\begin {align*} \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-1-p} \, dx &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{f g (1+p)}-\frac {B \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-p} \, dx}{c}\\ &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{f g (1+p)}-\frac {\left (B c (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{\frac {1}{2} (-1-p)} (c+c \sin (e+f x))^{\frac {1}{2} (-1-p)}\right ) \operatorname {Subst}\left (\int (c-c x)^{\frac {1}{2} (-1+p)-p} (c+c x)^{\frac {1}{2} (-1+p)} \, dx,x,\sin (e+f x)\right )}{f g}\\ &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{f g (1+p)}-\frac {\left (2^{-\frac {1}{2}-\frac {p}{2}} B c (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-\frac {1}{2}+\frac {1}{2} (-1-p)-\frac {p}{2}} \left (\frac {c-c \sin (e+f x)}{c}\right )^{\frac {1}{2}+\frac {p}{2}} (c+c \sin (e+f x))^{\frac {1}{2} (-1-p)}\right ) \operatorname {Subst}\left (\int \left (\frac {1}{2}-\frac {x}{2}\right )^{\frac {1}{2} (-1+p)-p} (c+c x)^{\frac {1}{2} (-1+p)} \, dx,x,\sin (e+f x)\right )}{f g}\\ &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{f g (1+p)}-\frac {2^{\frac {1}{2}-\frac {p}{2}} B (g \cos (e+f x))^{1+p} \, _2F_1\left (\frac {1+p}{2},\frac {1+p}{2};\frac {3+p}{2};\frac {1}{2} (1+\sin (e+f x))\right ) (1-\sin (e+f x))^{\frac {1+p}{2}} (c-c \sin (e+f x))^{-1-p}}{f g (1+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.75, size = 300, normalized size = 1.99 \[ -\frac {2^{-p} (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^p \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{-2 (-p-1)-2 p} \left (\frac {1-\tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {\frac {1}{\cos (e+f x)+1}}}\right )^{2 p} \left (\frac {1-\tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {\sec ^2\left (\frac {1}{2} (e+f x)\right )}}\right )^{-2 p} \left (p (A+B) \left (\tan \left (\frac {1}{2} (e+f x)\right )+1\right )-i B (p+1) \left (\tan \left (\frac {1}{2} (e+f x)\right )-1\right ) \, _2F_1\left (1,-p;1-p;-\frac {i \left (\tan \left (\frac {1}{2} (e+f x)\right )-1\right )}{\tan \left (\frac {1}{2} (e+f x)\right )+1}\right )+i B (p+1) \left (\tan \left (\frac {1}{2} (e+f x)\right )-1\right ) \, _2F_1\left (1,-p;1-p;\frac {i \left (\tan \left (\frac {1}{2} (e+f x)\right )-1\right )}{\tan \left (\frac {1}{2} (e+f x)\right )+1}\right )\right )}{f p (p+1) \left (\tan \left (\frac {1}{2} (e+f x)\right )-1\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.58, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 4.14, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x +e \right )\right )^{p} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{-1-p}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (g\,\cos \left (e+f\,x\right )\right )}^p\,\left (A+B\,\sin \left (e+f\,x\right )\right )}{{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{p+1}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________